import { axios } from "@/utils/request";

//注册
export function registerinfo(data: any) {
  return axios({
    url: "/auth/register",
    method: "post",
    data: {
      phone: data.phone,
      username: data.username,
      password: data.password,
      address: data.address,
      email: data.email,
    },
  });
}
// 登录
export function login(data: any) {
  return axios({
    url: `/auth/login`,
    method: "post",
    data: {
      phone: data.phone,
      password: data.password,
      role: data.type,
    },
  });
}
